package com.baizhi.service.impl;

import com.baizhi.dao.NewsDao;
import com.baizhi.entity.News;
import com.baizhi.service.NewsService;

import java.util.List;

public class NewsServiceImpl implements NewsService {
    private NewsDao nd;

    public NewsDao getNd() {
        return nd;
    }

    public void setNd(NewsDao nd) {
        this.nd = nd;
    }

    @Override
    public List<News> selectAll() {
        return nd.selectAll();
    }

    @Override
    public void delete(int id) {
        nd.delete(id);
    }

    @Override
    public void insert(News news) {
        nd.insert(news);
    }

    @Override
    public void update(News news) {
        nd.update(news);
    }

    @Override
    public News selectOne(int id) {
        return nd.selectOne(id);
    }
}
